package com.jiyinit.web.core.mobile.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jiyinit.core.framework.base.paging.PagingResult;
import com.jiyinit.web.core.mobile.dao.TabCoreExchangeDao;
import com.jiyinit.web.core.mobile.dto.ExchangeRequest;
import com.jiyinit.web.core.mobile.entity.TabCoreExchangeEntity;

@Service("core.exchangeServiceImpl")
public class ExchangeServiceImpl {
	
	@Resource(name = "core.tabCoreExchangeDao")
	private TabCoreExchangeDao tabCoreExchangeDao;
	
	
	/**
     * 多条件分页查询
     * @param request
     * @return
     */
	public PagingResult<TabCoreExchangeEntity> findForPage(ExchangeRequest request){
        return tabCoreExchangeDao.findForPage(request);
    }

	/**
	 * 分页查询
	 * @param request
	 * @return
	 */
	public PagingResult<TabCoreExchangeEntity> list(ExchangeRequest request){
		return tabCoreExchangeDao.list(request);
	}
	
	/**
	 * id查询
     * @param id
     * @return
     */
	public TabCoreExchangeEntity findOne(Integer id){
		return tabCoreExchangeDao.findOne(id);
	}
	
	/**
	 * 添加
     * @param entity
     * @return
     */
	public int add(TabCoreExchangeEntity entity){
		return tabCoreExchangeDao.add(entity);
	}
	
	/**
	 * 修改
     * @param entity
     * @return
     */
	public int update(TabCoreExchangeEntity entity){
		return tabCoreExchangeDao.update(entity);
	}
	
	/**
	 * 删除
     * @param id
     * @return
     */
	public int delete(Integer id){
		return tabCoreExchangeDao.delete(id);
	}

}
